const Mock = require("mockjs")
const query = require("./mysql")

let { shop_list } = Mock.mock({
    "shop_list|100": [{
        shop_img: 'https://unsplash.it/400/800/?@name',
        shop_title: "@ctitle(10,15)",
        shop_price: "@integer(100,1000)",
        shop_count: 0
    }]
})
shop_list.forEach(item => {
    let sql = `insert into shop_list (shop_price,shop_count,shop_title,shop_img) values ("${item.shop_price}","${item.shop_count}","${item.shop_title}","${item.shop_img}") `
    query(sql)
})

